//
//  NsOperationQueryTest.m
//  Async
//
//  Created by world on 13-6-5.
//  Copyright (c) 2013年 world. All rights reserved.
//

#import "NsOperationQueryTest.h"

@implementation NsOperationQueryTest


- (void)setUp
{
    [super setUp];
    
    queue = [[NSOperationQueue alloc] init];
    [queue setMaxConcurrentOperationCount:8];
    // Set-up code here.
}

- (void)tearDown
{
    // Tear-down code here.
    
    [super tearDown];
    
}

-(void)  testQueue{
    for (int i=0; i< 10; i++) {
        AsyncTask* task = [[AsyncTask alloc] init];
        [queue addOperation:task];
    }
   
 // [queue waitUntilAllOperationsAreFinished];
    [NSThread sleepForTimeInterval:2];
}


@end
